package com.learn.temp.api;

import java.util.ArrayList;

/**
 * @author wangxing
 * @version 2020/7/5 22:14 Administrator
 */
public class RuntimeConstantPoolOOM {
    public static void main(String[] args) {
        int size = 1000000;
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            for (int j = 0; j < size; j++) {
                list.add((String.valueOf(i + j / 1000000).intern()));
            }
        }
    }
}
